package com.hzlh.core.domain;

import java.util.HashMap;
import java.util.Map;

public class PageParameter {

	private int pageSize=10;//默认一页20条
	private int pageNo=1;//默认第一页
	private int pageCount;
	private int recordCount;
	private String sort;
	private Map<String,Object> queryFilter = new HashMap<String,Object>();
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getPageNo() {
		return pageNo;
	}
	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}
	public int getPageCount() {
			
		return pageCount;
	}
	public void setPageCount(int pageCount) {
		this.pageCount = pageCount;
	}
	public String getSort() {
		return sort;
	}
	public void setSort(String sort) {
		this.sort = sort;
	}
	public Map<String, Object> getQueryFilter() {
		return queryFilter;
	}
	public void setQueryFilter(Map<String, Object> queryFilter) {
		this.queryFilter = queryFilter;
	} 
	public void addQueryFilter(String key,String value){
		this.queryFilter.put(key, value);
	}
	public int getRecordCount() {
		return recordCount;
	}
	public void setRecordCount(int recordCount) {
		this.recordCount = recordCount;
		this.pageCount=(recordCount/pageSize)+1;
	}
	public int getPrePage(){
		return this.pageNo-1;
	}
	public int getNextPage(){
		return this.pageNo+1;
	}
}
